﻿using System.Net.Mail;
using System;
using System.Net;

namespace MvcMembership
{
    public class SmtpClientProxy : ISmtpClient
    {
        private readonly SmtpClient _smtpClient;

        public SmtpClientProxy(SmtpClient smtpClient)
        {
            //smtpClient.Host = System.Configuration.ConfigurationManager.AppSettings["smtpHost"];
            //smtpClient.EnableSsl = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["EnableSsl"]);
            //smtpClient.Credentials = new NetworkCredential(
            //    System.Configuration.ConfigurationManager.AppSettings["smtpHostLogin"],
            //    System.Configuration.ConfigurationManager.AppSettings["smtpHostPassword"]);
            _smtpClient = smtpClient;
        }

        #region ISmtpClient Members

        public void Send(MailMessage mailMessage)
        {
            _smtpClient.Send(mailMessage);
        }

        #endregion
    }
}